package org.xg.domain;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "SYS_ROLE")
public class RoleVO extends IdEntity {
	private String roleName;
	private String roleCode;
	private String remark;
	private Set<User2RoleVO> user2Role;	//用户、角色中间表
	private Set<Role2AuthorityVO> role2auth; //角色、权限中间表
	
	public RoleVO(){}
	
	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "ROLE_CODE")
	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	@OneToMany(mappedBy="role")
	public Set<User2RoleVO> getUser2Role() {
		return user2Role;
	}

	public void setUser2Role(Set<User2RoleVO> user2Role) {
		this.user2Role = user2Role;
	}

	@OneToMany(mappedBy="role")
	public Set<Role2AuthorityVO> getRole2auth() {
		return role2auth;
	}

	public void setRole2auth(Set<Role2AuthorityVO> role2auth) {
		this.role2auth = role2auth;
	}

}
